package com.chao.deeply.schedule;

import java.util.Timer;
import java.util.TimerTask;

/**
 * @author : Rookie
 * @description :
 * @date : 2023/5/14
 */
public class TimerTest {

    public static void main(String[] args) {

        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("time执行，线程" + Thread.currentThread().getName());
            }
        },1000,5000);
    }
}
